<!-- 我的弹窗 -->

<template>
  <WebModal small>
    <WebForm class="LightMode-MyModal">
      <FormSlot label="通知人" bind="noticeUserId" tip="请选择通知人" required>
        <ModalUser />
      </FormSlot>

      <FormRadio label="统计范围" bind="statisticsScope" :dict="DICT.DATE" initFirst />

      <EasyRow flex>
        <FormInput label="统计时间" bind="cron" :check="checkCron" lazy required @change="changeCron" />

        <FormSlot bind="analyze" tip="请解析" noLabel flex0 required>
          <BtnPrimary title="解析" :disabled="!one.cron" @click="toAnalyze" />
        </FormSlot>
      </EasyRow>
      <FormSlot isTip>Seconds Minutes Hours DayofMonth Month DayofWeek Year</FormSlot>

      <FormSlot label="最近十次">
        <div v-for="i of 5" :key="i">
          <div class="LightMode-MyModal-time half">
            <b>{{ i }}</b>
            <span>{{ one.times[i - 1] }}</span>
          </div>
          <div class="LightMode-MyModal-time half">
            <b>{{ i + 5 }}</b>
            <span>{{ one.times[i + 4] }}</span>
          </div>
        </div>
      </FormSlot>

      <FormStatus initFirst isRadio />
    </WebForm>
  </WebModal>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import MyModal from '@admin/views/Monitor/Light/LightMode/MyModal'

// ============================== 导出组件 ============================== //

export default CORE.extend(MyModal, {
  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb()],

  /**
   * 组件导入 (Abc.vue + Abc/index.vue)
   */
  ...CORE.components(require.context('./', true, /vue$/)),
})
</script>
